<%@page import="orz.mikeneck.server.locrec.controller.LocRecControllerImpl"%>
<%@page import="orz.mikeneck.server.locrec.controller.LocRecController"%>
<%@page import="orz.mikeneck.server.locrec.persistent.LocRecUser"%>
<%@page import="com.google.appengine.api.users.UserServiceFactory"%>
<%@page import="com.google.appengine.api.users.UserService"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="utf-8"%>
<%
	UserService userService = UserServiceFactory.getUserService();
	LocRecController<LocRecUser> controller = new LocRecControllerImpl(userService);
	LocRecUser user = controller.execute(response);
%>
<!DOCTYPE html>
<html lang="ja">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Mike LocRec</title>
	<link href="/styles/style.css" rel="stylesheet" type="text/css" />
	<link href="/styles/jquery-ui-1.8.13.custom.css" rel="stylesheet" type="text/css" />
	<link href="/styles/clockpick.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&region=JP"></script>
	<script type="text/javascript" src="/scripts/jquery.clockpick.1.2.1.js"></script>
	<script type="text/javascript" src="/scripts/location.js"></script>
</head>
<body>
	<div id="header">
		<div id="logo">
			<h1><a href="#">MikeLocRec</a></h1>
		</div>
		<div id="menu">
			<ul>
				<li><a href="<%= userService.createLogoutURL("/") %>">logout</a></li>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="page">
			<div id="content">
				<div class="post">
					<div class="entry">
						<div id="mainmap" style="width : 400px; height : 400px"></div>
					</div>
				</div>
			</div>
			<div id="sidebar">
				<ul>
					<li><h3>Welcome <%= user.getLoginId() %></h3></li>
					<li>&nbsp;</li>
					<li>&nbsp;</li>
					<li>
						<h2>Menu</h2>
						<ul>
						<%
							if(userService.isUserAdmin()){
						%>
							<li><a href='/admin/index.jsp'>Management Console</a></li>
						<%
							}
						%>
							<li><input type="checkbox" id="dateAll" value="1"/>only resent
								<select id="size">
									<option value="5">5</option>
									<option value="10">10</option>
									<option value="20" selected="selected">20</option>
									<option value="50">50</option>
									<option value="100">100</option>
								</select>
							logs</li>
							<li>
								<h3>Start</h3>
							</li>
							<li>
								<input type="text" class="input_form" id="dateBegin" value="2011/1/1" />
								<input tyep="text" class="input_form" id="timeBegin" value="10:00" />
							</li>
							<li>
								<h3>End</h3>
							</li>
							<li>
								<input type="text" class="input_form" id="dateEnd" value="2012/1/1" />
								<input tyep="text" class="input_form" id="timeEnd" value="10:00" />
							</li>
							<li><input type="button" id="search_btn" value="SEARCH"/></li>
						</ul>
					</li>
				</ul>
			</div>
			<div style="clear : both">&nbsp;</div>
		</div>
	</div>
</body>
</html>
